package com.sise.cn.task.annotation;

import javax.validation.Constraint;
import javax.validation.Payload;
import java.lang.annotation.Documented;
import java.lang.annotation.Retention;
import java.lang.annotation.Target;

import static java.lang.annotation.ElementType.FIELD;
import static java.lang.annotation.RetentionPolicy.RUNTIME;

/**
 * @author 龚秀峰
 * @version 1.0
 * @date 2020/6/7 10:32
 * 校验corn表达式是否合法
 */
@Target({FIELD})
@Retention(RUNTIME)
@Documented
@Constraint(validatedBy = CornValidator.class)
public @interface CornCheck {
    String message() default "corn表达式不合法";

    Class<?>[]groups() default { };

    Class<?extends Payload>[] payload() default {};
}
